package com.nexgo.payment.action;

public class ActionResult {
    /**
     * 成功
     */
    public static final int SUCC = 0;
    /**
     * 失败
     */
    public static final int ERR_FAIL = -1;
    /**
     * 取消
     */
    public static final int ERR_CANCEL = -2;
    /**
     * 超时
     */
    public static final int ERR_TIMEOUT = -3;

    //检查未获取到GPS信息
    public static final int ERR_GPS = -4;


    /**
     * 返回结果
     */
    private int ret;
    /**
     * 返回数据
     */
    private Object data;

    private Action<?> action;

    public ActionResult(Action<?> action, int ret, Object data) {
        this.action = action;
        this.ret = ret;
        this.data = data;
    }

    public int getRet() {
        return ret;
    }

    public Object getData() {
        return data;
    }

    public Action<?> getAction() {
        return action;
    }

}
